<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"> 
	<title>Bootstrap 实例 - 水平表单</title>
	<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
    <div class="row" >
        <div class="col-md-6 col-md-offset-2">
            <h1>登录</h1>
        </div>
    </div>
</div>
<form class="form-horizontal" role="form" action="/login/getUser" method="post">
	<div class="form-group">
		<label for="firstname" class="col-sm-2 control-label">名字</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" name="user.name"
				   placeholder="请输入名字">
		</div>
		<div class="col-sm-6"></div>
	</div>
	<div class="form-group">
		<label for="lastname" class="col-sm-2 control-label">姓</label>
		<div class="col-sm-4">
			<input type="password" class="form-control" name="user.password"
				   >
		</div>
		<div class="col-sm-6"></div>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-3">
		 <div class="alert alert-danger alert-dismissable" id="errormsgid" style="display: none">
            <button type="button" class="close" data-dismiss="alert"
                    aria-hidden="true">
                &times;
            </button>
         #(loginmsg)
        </div>
		
		
			<button type="submit" class="btn btn-default">登录</button>
		</div>
	</div>
</form>
<script type="text/javascript">
var msg="#(loginmsg)";


if(""!=msg){
	$("#errormsgid").show();
}



</script>
</body>
</html>